home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / cmds / fscmd.man < prev    next >
Text File  |  1992-09-28  |  7KB  |  144 lines

  1. ' $Header: /sprite/src/cmds/fscmd/RCS/fscmd.man,v 1.2 88/12/30 09:28:33 ouster Exp Locker: shirriff $ SPRITE (Berkeley)
  2. .so \*(]ltmac.sprite
  3. .HS FSCMD cmds
  4. .BS
  5. .SH NAME
  6. fscmd \- Set various parameters in the filesystem
  7. .SH SYNOPSIS
  8. .nf
  9. \fBfscmd\fR \-[\fBmM\fR] \fIsize\fR
  10. \fBfscmd\fR \-[\fBfslLNCv\fR] \fR
  11. \fBfscmd\fR \-[\fBwWxXyz\fR] \fR
  12. \fBfscmd\fR \-[\fBBOtDR\fR] \fR
  13. \fBfscmd\fR \-\fBgeneric\fR \fIarg\fR
  14. .fi
  15. .BE
  16. .SH INTRODUCTION
  17. This command is used to set various kernel variables that control
  18. the filesystem cache, tracing and debugging output, and other
  19. features of the system.
  20. It is implemented using the Fs_Command system call.
  21. .SH CACHE SIZE
  22. The minimum and maximum number of filesystem blocks (4 Kbytes each) in the
  23. main memory cache is set with the -m (minimum) and -M (maximum)
  24. arguments.  Follow either of these with the number of 4-Kbyte blocks, ie.
  25. -M 512 means a max of 2 Megabytes in the cache.
  26. .SH CACHE CONTROL
  27. .IP "\fB\-f"
  28. The entire contents of the cache gets written-back and then invalidated by
  29. specifying \fB\-f\fP.
  30. .IP "\fB\-s\fR [\fB0\fR|\fB1\fR]"
  31. The background process that writes back dirty data from the cache
  32. can be
  33. disabled
  34. by specifying the
  35. ``\fB\-s 0\fP''
  36. flag.  This should be done when patching a mounted filesystem
  37. or else bad internal structures will get pushed to disk.
  38. Enable the sync daemon with ``\fB\-s 1\fP''.
  39. .IP "\fB\-l\fR [\fB0\fR|\fB1\fR]"
  40. Biasing against ``large'' files in the cache is enabled with ``\fB\-l 1\fR''
  41. and turned off with ``\fB\-l 0\fR''.
  42. .IP "\fB\-L \fIsize\fR"
  43. This sets what portion of the maximum cache size a file must occupy before
  44. it is considered
  45. a large file.  For example a value of 8 would indicate that if a file is larger
  46. than 1/8 of the maximum cache size then it is considered a large file.
  47. .IP "\fB\-C\fR [\fB0\fR|\fB1\fR]"
  48. Caching on diskless nodes can be disabled with ``\fB\-C 0\fR'',
  49. and turned back on with ``\fB\-C 1\fR''.
  50. This has to be done on a file server to affect its clients; use of the -C
  51. flag on clients will have no effect.
  52. .IP "\fB\-N\fR [\fB0\fR|\fB1\fR]"
  53. The name cache on a diskfull node is disabled with
  54. ``\fB\-N 0\fR'' and enabled with ``\fB\-N 1\fR''.
  55. .IP "\fB\-v\fR [\fB0\fR|\fB1\fR]"
  56. The Virtual Memory cache of recently used program segments is
  57. disabled with ``\fB\-v 1\fR'' (yes, 1), and enabled with ``\fB\-v 0\fR''.
  58. .IP "\fB\-b \fIN\fR"
  59. Set the maximum number of block cleaner processes.  This controls the
  60. amount of overlap during cache writebacks.  3 processes provides the most
  61. bandwidth, but it does load the server.
  62. .IP "\fB\-r \fIN\fR"
  63. Set the read ahead distance (in 4K blocks).  When a read on the cache
  64. is done, the transfer of N more blocks is initiated.
  65. .SH "CACHE WRITE BACK POLICY"
  66. Normally, dirty blocks in the file system cache are aged for at least
  67. 30 seconds before being written back.  This gives the best performance,
  68. although alternate strategies can be tried out with the following flags.
  69. There are two write-back policies involved: the client's and the server's.
  70. Each of the flags below only affects the policy on the client or server
  71. on which it is invoked.  For example the client could be using a
  72. write-through policy and the server a 30-second-delay policy.  This would
  73. mean that client writes would not complete until the blocks have been written
  74. across the network into the server's cache, but the blocks would not be
  75. written back to disk until at least 30 seconds later.
  76. .IP "\fB\-S \fIseconds\fR"
  77. Set the cache write-back interval in seconds. 
  78. .IP "\fB\-w\fR [\fB0\fR|\fB1\fR]"
  79. Write-through caching is enabled with ``\fB\-w 1\fR'' and
  80. disabled with ``\fB\-w 0\fR''.  With write-through,
  81. the write system call does not complete until
  82. the cache block is written back. 
  83. .IP "\fB\-W [\fB0\fR|\fB1\fR]"
  84. Write-back-on-close caching is enabled with
  85. ``\fB\-W 1\fR'' and disabled with ``\fB\-W 0\fR''.
  86. With write-back-on-close the close system call does not complete
  87. until all of the file's dirty blocks are written back.  
  88. .IP "\fB\-x\fR [\fB0\fR|\fB1\fR]"
  89. Write-back of temporary files can be set to delay as long as possible
  90. with ``\fB\-x 1\fR''.  This is turned off with ``\fB\-x 0\fR''.  Normally temporary files are
  91. files that are in the /tmp directory.
  92. .IP "\fB\-X \fIdirNumber\fR"
  93. This identifies the temporary directory to the file system.
  94. \fIdirNumber\fP should be the inode number of /tmp.
  95. Unfortunately, only one temporary directory is understood.
  96. .IP "\fB\-y\fR [\fB0\fR|\fB1\fR]
  97. Write-back-as-soon-as-possible caching is enabled with ``\fB\-y 1\fR''
  98. and turned off with ``\fB\-y 0\fR''.
  99. With write-back-ASAP, the write system call completes immediately
  100. and the cache block is scheduled to be written out as-soon-as-possible.
  101. .IP "\fB\-z\fR [\fB0\fR|\fB1\fR]"
  102. Write-back-on-last-dirty-block caching is enabled with ``\fB\-z 1\fR''
  103. and turned off with ``\fB\-z 0\fR''.
  104. This policy only works on a server.  It 
  105. means the server writes back its blocks for a file
  106. after getting the last dirty block for the file from a client.  For example,
  107. this policy combined with a write-back-on-close client policy would mean
  108. that after a client closes a file, all of the files blocks are guaranteed
  109. to be on the server's disk.
  110. .SH DISK LAYOUT
  111. .IP "\fB\-B \fIskew\fR"
  112. Set the block skew for disk allocation.  Not supported in kernel yet.
  113. .SH TRACING/DEBUG FLAGS
  114. There are several tracing/debugging flags that can have their
  115. value set via \fBfscmd\fR.  Each flag expects a following integer
  116. on the command line that will specify the new value of
  117. the flag or trace level variable.  \fBFscmd\fR prints out the
  118. old value of the flag as it changes it.
  119. Some of the flags are Booleans that are
  120. set with values of 1 for TRUE, and 0 for FALSE.
  121. .IP "\fB\-O\fR"
  122. The fsStats structure is zeroed out.  This information is displayed
  123. with the fsStat program.
  124. .IP "\fB\-t\fR [\fB0\fR|\fB1\fR]"
  125. Filesystem tracing is enabled with ``\fB\-t 1\fR''.  This dumps internal events
  126. into a circular trace record.  The trace gets printed via a
  127. special console key sequence, ``\fBL1-f\fR''.
  128. .IP "\fB\-D\fR [\fB0\fR|\fB1\fR]"
  129. Cache consistency debug print statements are turned on with ``\fB\-D 1\fR'',
  130. and turned off with ``\fB\-D 0\fR''.
  131. .IP "\fB\-R\fR [\fB0\fR|\fB1\fR]"
  132. Read ahead tracing is enabled with ``\fB\-R 1\fR'' and turned off with ``\fB\-R 0\fR''.
  133. .IP "\fB\-generic\fR \fIarg\fR"
  134. A generic hook for temporary file system operations.  The result depends on
  135. arg.
  136. .SH "SEE ALSO"
  137. fsStat, prefix, rpcCmd
  138. .SH FILES
  139. .nf
  140. /local/diskcmds        - Server local startup file
  141. /bootcmds        - Network wide startup file
  142. .SH KEYWORDS
  143. debugging, trace, cache, write-back
  144.